div
<template>
  <div class="user">
    <div class="container">
      <!--部门数据-->
      <div class="deptTree">
        <div class="search-dept">
          <el-input
            v-model="deptName"
            placeholder="请输入部门名称"
            clearable
            maxlength="30"
          />
          <div class="btn search" @click="getApplyList">
            <el-icon class="icon" color="#fff"> <Search /> </el-icon
            >{{ $t("common.search") }}
          </div>
        </div>
        <div class="head-container treeData">
          <el-tree
            :data="deptOptions"
            :props="{ label: 'deptName', children: 'children' }"
            :expand-on-click-node="false"
            :filter-node-method="filterNode"
            ref="deptTreeRef"
            node-key="deptId"
            highlight-current
            default-expand-all
            @node-click="handleNodeClick"
          />
        </div>
      </div>

      <!--用户数据-->
      <div class="tableList">
        <div class="search-card">
          <div class="search-argument">
            <!-- 关键字 -->
            <div class="search-item">
              <span class="labelName">{{ $t("system.Keyword") }}</span>
              <el-select
                class="search-input"
                v-model="keywords"
                placeholder="请选择关键字"
                clearable
              >
                <el-option
                  v-for="key in keywordsList"
                  :key="key.value"
                  :label="key.label"
                  :value="key.value"
                />
              </el-select>
            </div>
            <!-- 关键字内容 -->
            <div class="search-item">
              <el-input
                clearable
                v-model="keyValue"
                class="search-input"
                maxlength="30"
                placeholder="关键字内容"
              ></el-input>
            </div>

            <!-- 账号状态 -->
            <div class="search-item">
              <span class="labelName">{{ $t("system.Status") }}</span>
              <el-select
                class="search-input"
                v-model="queryParams.status"
                placeholder="账号状态"
                clearable
              >
                <el-option
                  v-for="dict in sys_normal_disable1"
                  :key="dict.value"
                  :label="dict.label"
                  :value="dict.value"
                />
              </el-select>
            </div>
            <!-- 搜索按钮 -->
            <div class="search-button">
              <div class="btn search" @click="handleQuery">
                <el-icon class="icon" color="#fff"> <Search /> </el-icon
                >{{ $t("common.search") }}
              </div>
              <div class="btn reset" @click="resetQuery">
                <el-icon class="icon" color="rgba(43, 193, 123, 1)">
                  <Refresh /> </el-icon
                >{{ $t("common.reset") }}
              </div>
            </div>
          </div>
          <div class="batch-operation">
            <el-button
              type="primary"
              plain
              class="addBtn"
              icon="Plus"
              @click="handleAdd"
              v-hasPermi="['system:user:add']"
              >{{ $t("system.Add") }}</el-button
            >
          </div>
        </div>

        <el-table v-loading="loading" :data="userList" max-height="62vh">
          <el-table-column
            :label="$t('system.SerialNo')"
            align="center"
            min-width="50"
            type="index"
          />
          <el-table-column
            :label="$t('system.FullName')"
            align="center"
            key="nickName"
            prop="nickName"
            :show-overflow-tooltip="true"
          />
          <el-table-column
            :label="$t('system.UserName')"
            align="center"
            key="userName"
            prop="userName"
            :show-overflow-tooltip="true"
          />

          <el-table-column
            :label="$t('system.PhoneNumber')"
            align="center"
            key="phonenumber"
            prop="phonenumber"
            width="120"
          />
          <el-table-column
            :label="$t('system.Dept')"
            align="center"
            key="deptName"
            prop="dept.deptName"
            :show-overflow-tooltip="true"
          />
          <el-table-column
            :label="$t('system.Post')"
            align="center"
            key="deptName"
            prop="dept.deptName"
            :show-overflow-tooltip="true"
          />
          <el-table-column
            :label="$t('system.Status')"
            align="center"
            key="status"
          >
            <template #default="{ row }">
              <span class="tag" v-if="row.status === '1'">{{
                $t("system.Stop")
              }}</span>
              <span class="tag success" v-if="row.status === '0'">{{
                $t("system.Normal")
              }}</span>
            </template>
          </el-table-column>

          <el-table-column
            :label="$t('system.Operate')"
            align="center"
            min-width="200"
            class-name="small-padding fixed-width"
          >
            <template #default="{ row }">
              <el-button
                v-if="row.userId !== 1"
                link
                type="primary"
                @click="handleUpdate(row.userId, 'detail')"
                v-hasPermi="['system:user:detail']"
                >{{ $t("common.detail") }}</el-button
              >

              <el-button
                v-if="row.userId !== 1"
                link
                type="primary"
                @click="handleUpdate(row.userId, 'edit')"
                v-hasPermi="['system:user:edit']"
                >{{ $t("common.edit") }}</el-button
              >

              <el-button
                v-if="row.userId !== 1 && row.status === '1'"
                link
                type="primary"
                @click="changeStatus(row.userId, row.status, row.userName)"
                v-hasPermi="['system:user:enable']"
                >{{ $t("system.Enable") }}</el-button
              >

              <el-button
                v-if="row.userId !== 1 && row.status === '0'"
                link
                type="danger"
                @click="changeStatus(row.userId, row.status, row.userName)"
                v-hasPermi="['system:user:stop']"
                >{{ $t("system.Stop") }}</el-button
              >

              <el-button
                v-if="row.userId !== 1"
                link
                type="danger"
                @click="handleDelete(row.userId, row.userName)"
                v-hasPermi="['system:user:remove']"
                >{{ $t("common.delete") }}</el-button
              >

              <el-button
                v-if="row.userId !== 1"
                link
                type="danger"
                @click="handleResetPwd(row.userId, row.userName)"
                v-hasPermi="['system:user:resetPwd']"
                >{{ $t("system.ResetPwd") }}</el-button
              >

              <!-- <el-button
              v-if="row.userId !== 1"
              link
              type="primary"
              @click="handleAuthRole(row)"
              v-hasPermi="['system:user:edit']"
              >分配角色</el-button
            > -->
            </template>
          </el-table-column>
        </el-table>

        <pagination
          v-show="total > 0"
          :total="total"
          v-model:page="queryParams.pageNum"
          v-model:limit="queryParams.pageSize"
          @pagination="getList"
          class="pagination"
        />
      </div>
    </div>

    <!-- 添加或修改用户配置对话框 -->
    <el-dialog :title="title" v-model="open" append-to-body class="add-dialog">
      <el-form :model="form" :rules="rules" ref="userRef" label-width="100px">
        <el-form-item :label="$t('system.UserName')" prop="userName">
          <el-input
            clearable
            :disabled="isDisabled"
            v-model="form.userName"
            placeholder="请输入用户名称"
            maxlength="30"
            @blur="setFirstPwd"
          />
        </el-form-item>
        <el-form-item :label="$t('system.FullName')" prop="nickName">
          <el-input
            :disabled="isDisabled"
            clearable
            v-model="form.nickName"
            placeholder="请输入用户姓名"
            maxlength="30"
          />
        </el-form-item>
        <el-form-item :label="$t('system.PhoneNumber')" prop="phonenumber">
          <el-input
            :disabled="isDisabled"
            clearable
            v-model="form.phonenumber"
            placeholder="请输入手机号码码"
            maxlength="11"
          />
        </el-form-item>
        <el-form-item :label="$t('system.Password')" prop="password">
          <el-input
            :disabled="isDisabled"
            clearable
            v-model="form.password"
            placeholder="请输入用户密码"
            type="password"
            maxlength="20"
            show-password
          />
        </el-form-item>

        <el-form-item :label="$t('system.Dept')" prop="deptId">
          <el-tree-select
            :disabled="isDisabled"
            clearable
            v-model="form.deptId"
            :data="deptOptions"
            :expand-on-click-node="true"
            :props="{
              value: 'deptId',
              label: 'deptName',
              children: 'children',
            }"
            value-key="deptId"
            placeholder="请选择部门"
            check-strictly
          />
        </el-form-item>

        <el-form-item :label="$t('system.Post')" prop="postIds">
          <el-select
            :disabled="isDisabled"
            clearable
            v-model="form.postIds"
            multiple
            placeholder="请选择"
          >
            <el-option
              v-for="item in postOptions"
              :key="item.postId"
              :label="item.postName"
              :value="item.postId"
              :disabled="item.status == 1"
            ></el-option>
          </el-select>
        </el-form-item>

        <el-form-item :label="$t('system.Role')" prop="roleIds">
          <el-select
            :disabled="isDisabled"
            clearable
            v-model="form.roleIds"
            multiple
            placeholder="请选择"
          >
            <el-option
              v-for="item in roleOptions"
              :key="item.roleId"
              :label="item.roleName"
              :value="item.roleId"
              :disabled="item.status == 1"
            ></el-option>
          </el-select>
        </el-form-item>

        <el-form-item :label="$t('system.Status')" prop="status">
          <el-select
            :disabled="isDisabled"
            clearable
            v-model="form.status"
            placeholder="请选择"
          >
            <el-option
              v-for="item in sys_normal_disable"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            ></el-option>
          </el-select>
        </el-form-item>
      </el-form>
      <div class="dialogFoot">
        <div class="btn delete" @click="cancel">
          {{ isDisabled ? "关闭" : "取消" }}
        </div>
        <div v-if="!isDisabled" class="btn search" @click="submitForm">
          确定
        </div>
      </div>
    </el-dialog>

    <!-- 修改状态弹出层 -->
    <el-dialog v-model="changeDialogVis" class="no-header-dialog">
      <img
        v-if="changedStatus === '启用'"
        src="@/assets/images/prohibit.png"
        alt=""
      />
      <img v-else src="@/assets/images/enable.png" alt="" />
      <div v-if="changedStatus === '启用'" class="dec">
        确定停用
        <span class="deletecolor">{{ changedName }}</span> 的账号吗？
      </div>
      <div v-else class="dec">
        确定启用恢复
        <span class="deletecolor">{{ changedName }}</span> 的账号吗？
      </div>
      <div class="chooise">
        <div class="btn delete" @click="unmodify">取消</div>
        <div class="btn success" @click="modify">确定</div>
      </div>
    </el-dialog>

    <!-- 删除弹出层 -->
    <el-dialog v-model="deleteDiaVis" class="no-header-dialog">
      <img src="@/assets/images/warn.png" alt="" />
      <div class="dec">
        删除后不可恢复，确定删除<span class="deletecolor">{{
          changedName
        }}</span
        >的账号吗？
      </div>
      <div class="chooise">
        <div class="btn delete" @click="undelete">取消</div>
        <div class="btn success" @click="confirmDel">确定</div>
      </div>
    </el-dialog>

    <!-- 修改密码弹出层 -->
    <el-dialog v-model="changePwdDialog" class="no-header-dialog">
      <img src="@/assets/images/warn.png" alt="" />
      <div class="dec">
        确定重置<span class="deletecolor">{{ changedName }}</span
        >的账号密码吗？重置后变为初始密码<span class="deletecolor">{{
          newPassWord
        }}</span>
      </div>
      <div class="chooise">
        <div class="btn delete" @click="cancelChangePwd">取消</div>
        <div class="btn success" @click="confirmChangePwd">确定</div>
      </div>
    </el-dialog>
  </div>
</template>

<script setup name="User">
import { getToken } from "@/utils/auth";
import {
  changeUserStatus,
  listUser,
  resetUserPwd,
  delUser,
  getUser,
  updateUser,
  addUser,
  deptTreeSelect,
} from "@/api/system/user";
import { listDept } from "@/api/system/dept";
import { onMounted, reactive } from "vue";
import { ElMessage } from "element-plus";
import { useRouter } from "vue-router";
import { getCurrentInstance } from "vue";

const { $t } = getCurrentInstance().proxy;
const router = useRouter();
const { proxy } = getCurrentInstance();
const { sys_user_sex, sys_normal_disable } = proxy.useDict(
  "sys_user_sex",
  "sys_normal_disable"
);

const sys_normal_disable1 = ref([
  { label: "全部", value: "" },
  { label: "正常", value: 1 },
  { label: "停用", value: 0 },
]);

const userList = ref([]);
const open = ref(false);
const loading = ref(true);
const keywordsList = reactive([
  {
    value: "nickName",
    label: "姓名",
  },
  {
    value: "userName",
    label: "用户名",
  },
  {
    value: "phonenumber",
    label: "手机号码",
  },
  {
    value: "deptId",
    label: "部门",
  },
]);
const keywords = ref("nickName");
const keyValue = ref();
const showSearch = ref(true);
const ids = ref([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const title = ref("");
const dateRange = ref([]);
const deptName = ref("");
const deptOptions = ref(undefined);
const initPassword = ref(undefined);
const postOptions = ref([]);
const roleOptions = ref([]);
const newPassWord = ref();
const changePwdUserId = ref();
const changePwdDialog = ref(false);
/*** 用户导入参数 */
const upload = reactive({
  // 是否显示弹出层（用户导入）
  open: false,
  // 弹出层标题（用户导入）
  title: "",
  // 是否禁用上传
  isUploading: false,
  // 是否更新已经存在的用户数据
  updateSupport: 0,
  // 设置上传的请求头部
  headers: { Authorization: "Bearer " + getToken() },
  // 上传的地址
  url: import.meta.env.VITE_APP_BASE_API + "/system/user/importData",
});

const data = reactive({
  form: {},
  queryParams: {
    pageNum: 1,
    pageSize: 10,
    userName: undefined,
    nickName: undefined,
    phonenumber: undefined,
    status: "",
    deptId: undefined,
  },
  rules: {
    userName: [
      { required: true, message: "用户名称不能为空", trigger: "blur" },
      {
        min: 2,
        max: 20,
        message: "用户名称长度必须介于 2 和 20 之间",
        trigger: "blur",
      },
    ],
    nickName: [
      { required: true, message: "用户姓名不能为空", trigger: "blur" },
    ],
    password: [
      { required: true, trigger: "blur", message: "用户密码不能为空" },
      {
        min: 8,
        max: 20,
        pattern:
          /^(?=.*\d)(?=.*[a-zA-Z])(?=.*[~!@#$%^&*.])[\da-zA-Z~!@#$%^&*.]{8,20}$/,
        message: "密码为8-20位的数字、字母和特殊字符混合组成",
        trigger: "blur",
      },
    ],
    phonenumber: [
      { required: true, message: "手机号不能为空", trigger: "blur" },
      {
        required: true,
        pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
        message: "请输入正确的手机号码码",
        trigger: "blur",
      },
    ],
    deptId: [{ required: true, message: "请选择用户部门", trigger: "change" }],
    postIds: [{ required: true, message: "请选择用户职位", trigger: "change" }],
    roleIds: [{ required: true, message: "请选择用户角色", trigger: "change" }],
    status: [{ required: true, message: "请选择用户状态", trigger: "change" }],
  },
});

const { queryParams, form, rules } = toRefs(data);

const isDisabled = computed(() => {
  return title.value === $t("system.UserDetail");
});

/** 通过条件过滤节点  */
const filterNode = (value, data) => {
  console.log(value);
  console.log(data);
  if (!value) return true;
  return data.deptName.indexOf(value) !== -1;
};
/** 根据名称筛选部门树 */
watch(deptName, (val) => {
  proxy.$refs["deptTreeRef"].filter(val);
});
/** 查询部门下拉树结构 */
const getDeptTree = async () => {
  const { data } = await listDept();
  deptOptions.value = proxy.handleTree(data, "deptId");
};
/** 查询用户列表 */
function getList() {
  loading.value = true;
  listUser({ ...queryParams.value, [keywords.value]: keyValue.value }).then(
    (res) => {
      loading.value = false;
      userList.value = res.rows;
      total.value = res.total;
    }
  );
}
/** 节点单击事件 */
function handleNodeClick(data) {
  queryParams.value.deptId = data.deptId;
  handleQuery();
}
/** 搜索按钮操作 */
function handleQuery() {
  queryParams.value.pageNum = 1;
  getList();
}
/** 重置按钮操作 */
function resetQuery() {
  keywords.value = "nickName";
  keyValue.value = null;
  queryParams.value.deptId = undefined;
  queryParams.value.status = undefined;
  handleQuery();
}

// -----------------------------------------------------    删除用户  ------------------------------------------------------------------

const deleteDiaVis = ref(false);

/**
 * @修改用户状态
 * */
const handleDelete = (userId, userName) => {
  deleteDiaVis.value = true;
  changedId.value = userId;
  changedName.value = userName;
};

/**
 * @取消修改用户状态
 * */
const undelete = () => {
  deleteDiaVis.value = false;
  changedId.value = null;
  changedName.value = null;
};

/**
 * @确认修改用户状态
 * */
const confirmDel = async () => {
  const { code, msg } = await delUser(changedId.value);
  if (code === 200) ElMessage.success(msg);
  else ElMessage.error(msg);
  getList();
  undelete();
};

// ---------------------------------------------------    修改状态与重置密码  -------------------------------------------------------------
const changedId = ref();
const changedStatus = ref();
const changedName = ref();
const changeDialogVis = ref(false);
/**
 * @修改用户状态
 * */
const changeStatus = (userId, status, userName) => {
  changeDialogVis.value = true;
  changedId.value = userId;
  changedStatus.value = status === "0" ? "启用" : "停用";
  changedName.value = userName;
};

/**
 * @取消修改用户状态
 * */
const unmodify = () => {
  changeDialogVis.value = false;
  changedId.value = null;
  changedStatus.value = null;
  changedName.value = null;
};

/**
 * @确认修改用户状态
 * */
const modify = async () => {
  let status = changedStatus.value === "启用" ? "1" : "0";
  const { code, msg } = await changeUserStatus(changedId.value, status);
  if (code === 200) ElMessage.success(msg);
  else ElMessage.error(msg);
  getList();
  unmodify();
};

/**
 * @新增用户时自动设置初始密码
 * */
function setFirstPwd() {
  if (!form.value.userId) {
    form.value.password = `${form.value.userName}@123`;
  }
}

/**
 * @点击重置密码
 * */
function handleResetPwd(userId, userName) {
  changePwdDialog.value = true;
  newPassWord.value = userName + "@123";
  changedId.value = userId;
  changedName.value = userName;
}

/**
 * @取消重置密码
 * */
const cancelChangePwd = () => {
  changePwdDialog.value = false;
  changedId.value = null;
  newPassWord.value = null;
  changedName.value = null;
};

/**
 * @确认重置密码
 * */
const confirmChangePwd = async () => {
  const { code, msg } = await resetUserPwd(changedId.value, newPassWord.value);
  if (code === 200) ElMessage.success(msg);
  else ElMessage.error(msg);
  getList();
  cancelChangePwd();
};

/** 导入按钮操作 */
function handleImport() {
  upload.title = "用户导入";
  upload.open = true;
}
/** 下载模板操作 */
function importTemplate() {
  proxy.download(
    "system/user/importTemplate",
    {},
    `user_template_${new Date().getTime()}.xlsx`
  );
}
/**文件上传中处理 */
const handleFileUploadProgress = (event, file, fileList) => {
  upload.isUploading = true;
};
/** 文件上传成功处理 */
const handleFileSuccess = (response, file, fileList) => {
  upload.open = false;
  upload.isUploading = false;
  proxy.$refs["uploadRef"].handleRemove(file);
  proxy.$alert(
    "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
      response.msg +
      "</div>",
    "导入结果",
    { dangerouslyUseHTMLString: true }
  );
  getList();
};
/** 提交上传文件 */
function submitFileForm() {
  proxy.$refs["uploadRef"].submit();
}

/** 重置操作表单 */
function reset() {
  form.value = {
    userId: undefined,
    deptId: undefined,
    userName: undefined,
    nickName: undefined,
    password: undefined,
    phonenumber: undefined,
    email: undefined,
    sex: undefined,
    status: "0",
    remark: undefined,
    postIds: [],
    roleIds: [],
  };
  proxy.resetForm("userRef");
}
/** 取消按钮 */
function cancel() {
  open.value = false;
  reset();
}
/** 新增按钮操作 */
function handleAdd() {
  reset();
  getUser().then((response) => {
    postOptions.value = response.posts;
    roleOptions.value = response.roles;
    open.value = true;
    title.value = $t("system.AddUser");
    form.value.password = initPassword.value;
    console.log(postOptions.value);
  });
}

/** 修改按钮操作 */
function handleUpdate(userId, openType) {
  reset();
  getUser(userId).then((response) => {
    form.value = response.data;
    postOptions.value = response.posts;
    roleOptions.value = response.roles;
    form.value.postIds = response.postIds;
    form.value.roleIds = response.roleIds;
    open.value = true;
    title.value =
      openType === "edit" ? $t("system.EditUser") : $t("system.UserDetail");
    form.password = "";
  });
}
/** 提交按钮 */
function submitForm() {
  proxy.$refs["userRef"].validate((valid) => {
    if (valid) {
      if (form.value.userId != undefined) {
        updateUser(form.value).then((response) => {
          proxy.$modal.msgSuccess("修改成功");
          open.value = false;
          getList();
        });
      } else {
        addUser(form.value).then((response) => {
          proxy.$modal.msgSuccess("新增成功");
          open.value = false;
          getList();
        });
      }
    }
  });
}
onMounted(() => {
  getDeptTree();
  getList();
});
</script>

<style lang="scss">
.user {
  .search-item .search-input .el-input {
    //  width: 250px !important;
    height: 40px !important;
  }
  .deptTree .el-tree {
    .el-tree-node {
      .el-tree-node__content {
        position: relative;
        .el-icon {
          position: absolute;
          top: 0;
          right: 0;
        }
      }
    }
  }
}
</style>

<style lang="scss" scoped>
.user {
  // display: flex;
  // justify-content: space-between;
  // align-items: center;
  // padding: 30px;
  width: 100%;
  height: 100%;

  .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    width: calc(100% - 40px);
    height: 92%;
    margin: 0 20px 20px;
    border-radius: 10px;
    // background: white;
  }

  .search-card {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: flex-start;
    padding: 36px 24px;
    width: 100%;
    height: 100px;
    background-color: #fff;

    .el-button {
      width: 106px;
      height: 40px;
      opacity: 1;
      border-radius: 4px;
      background: rgba(43, 193, 123, 1);
      border: 1px solid rgba(43, 193, 123, 1);
      font-size: 14px;
      color: white;
    }
  }

  .search-argument {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-content: flex-start;
    position: relative;
    gap: 15px;

    .search-item {
      display: flex;
      justify-content: flex-start;
      align-items: center;
      width: 25%;
      height: 40px;
    }

    .search-input {
      width: 270px;
      height: 40px;
    }

    .labelName {
      width: 70px;
      text-align: right;
      font-size: 14px;
      margin-right: 15px;
    }

    .search-time {
      display: flex;
      justify-content: center;
      align-items: center;
      width: 30%;
      height: 40px;
    }

    .search-button {
      position: absolute;
      right: -20px;
      top: -75px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      width: 160px;
      height: 40px;
    }
  }

  .batch-operation {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    position: absolute;
    right: 200px;
    top: -45px;
    height: 40px;
    .addBtn {
      height: 34px;
    }
  }

  .deptTree {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 30px;
    width: 20%;
    height: 100%;
    background: white;

    .search-dept {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 30px;
      width: 100%;

      .el-input {
        width: 60%;
        height: 34px;
      }
    }
    .head-container {
      width: 100%;
    }

    .treeData {
      flex: 1;
    }
  }

  .tableList {
    position: relative;
    width: 79%;
    height: 100%;
    background: white;

    .pagination {
      position: absolute;
      left: 50%;
      bottom: 30px;
      transform: translateX(-50%);
    }
  }

  .btn {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 34px;
    padding: 10px;
    font-size: 14px;
    border-radius: 4px;
    user-select: none;
    cursor: pointer;
  }
  .btn.search {
    color: #fff;
    background: rgba(43, 193, 123, 1);
    &:hover {
      background: rgba(43, 193, 123, 0.85);
    }
  }

  .btn.reset {
    color: rgba(43, 193, 123, 1);
    background: rgba(43, 193, 123, 0.05);
    border: 1px solid rgba(43, 193, 123, 1);
    &:hover {
      background: rgba(43, 193, 123, 0.2);
    }
  }

  .btn.remove {
    color: rgba(255, 149, 18, 1);
    background: rgba(255, 149, 18, 0.05);
    border: 1px solid rgba(255, 149, 18, 1);
    &:hover {
      background: rgba(255, 149, 18, 0.2);
    }
  }

  .tag {
    display: inline-block;
    width: 80px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 15px;
    color: rgba(153, 153, 153, 1);
    border: 1px solid rgba(153, 153, 153, 1);
  }
  .tag.warning {
    color: rgba(255, 149, 18, 1);
    border: 1px solid rgba(255, 149, 18, 1);
  }
  .tag.success {
    color: rgba(43, 193, 123, 1);
    border: 1px solid rgba(43, 193, 123, 1);
  }
}
</style>
